/**
 * Copyright (c) qzsoft All rights reserved.
 *
 * qzsoft.cn
 *
 * 版权所有，侵权必究！
 */

package com.qzsoft.system.modules.permission.user.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qzsoft.jeemis.platform.user.dto.DeptAndUserDTO;
import com.qzsoft.system.modules.permission.user.dto.PasswordDTO;
import com.qzsoft.system.modules.permission.user.dto.SysUserDTO;
import com.qzsoft.system.modules.permission.user.dto.SysUserInfoDto;
import com.qzsoft.system.repository.sys.entity.SysUserEntity;
import com.qzsoft.system.modules.permission.user.dto.UserTypeDTO;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;


/**
 * 系统用户
 *
 */
public interface SysUserService {

	/**
	 * page
	 * @param params
	 * @return
	 */
	IPage<SysUserEntity> page(Map<String, Object> params);

	/**
	 * 取列表
	 * @param
	 * @return
	 */
	List<SysUserEntity> list(Map<String, Object> params);

	SysUserDTO get(Long id);

	/**
	 *
	 * @param username
	 * @return
	 */
	SysUserDTO getByUsername(String username);

	void save(SysUserDTO dto);

	void update(SysUserDTO dto);

	void delete(Long[] ids);

	/**
	 * 修改密码
	 * @param passwordDTO
	 */
	void updatePassword(PasswordDTO passwordDTO);


	/**
	 * 批量删除用户
	 * @param idList
	 */
	void deleteBatchIds(Collection<? extends Serializable> idList);
	/**
	 *  根据部门ID，查询用户数
	 * @param deptId
	 * @return
	 */
	int getCountByDeptId(String deptId);

	List<SysUserEntity>  getUserByDeptId(String deptId);
	List<Map>  getUserByUserName(String userName);
	List<SysUserDTO>  queryUserWithType(List<String> utList);
	List<SysUserEntity>  queryByUserIds(List utList);

/***************  2020-10-10 15:25:50  代码迁移  高丙祥  ADD START  ***************/
	/**
	 * 更新登录者自我信息
	 * @param sysUserDTO
	 */
	void updateCurrentUserInfo(SysUserDTO sysUserDTO);
	
	IPage<SysUserInfoDto> getListPage(Map<String, Object> params);
	
	SysUserDTO getCurrentUserInfo(Long id);
/***************  2020-10-10 15:50:50  代码迁移  高丙祥  ADD END  ***************/
//  李化军修改
	List<DeptAndUserDTO> getDeptAndUsers(String pid);

	List<DeptAndUserDTO> getSelectDeptAndUser(String pid);

	List<DeptAndUserDTO> getSearchDeptAndUser(String key);

	/**
	 * 查询磅房操作员
	 * @param map
	 * @return
	 */
	IPage<SysUserInfoDto> poundsPage(Map<String, Object> map);
}
